package com.kefu.call.vo;

import java.util.Date;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractUpdateVo;
import com.kefu.call.model.CdrSetmeal;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author CodeGenerator
 * @date 2022/07/26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "计费_套餐表")
public class CdrSetmealUpdateVo extends AbstractUpdateVo<CdrSetmeal,Long> {

    @NotNull
    @ApiModelProperty(value = "主键")
    private Integer oid;
    
    @ApiModelProperty(value = "套餐名称")
    private String name;
    
    @ApiModelProperty(value = "套餐备注")
    private String remarks;
    
    @ApiModelProperty(value = "租用单位[月]")
    private String rentalunit;
    
    @ApiModelProperty(value = "租用租金")
    private String rentalmoney;
    
    @ApiModelProperty(value = "免费分钟数")
    private String rentalminute;
    @ApiModelProperty(value = "创建时间")
    private Date createtime;
    @ApiModelProperty(value = "规则时间")
    private Integer chargingtime;
    
    @ApiModelProperty(value = "超规则收费")
    private String localmoneys;
    
    @ApiModelProperty(value = "本地市话")
    private String localmoney;
    
    @ApiModelProperty(value = "国内长途")
    private String domesticmoney;
    
    @ApiModelProperty(value = "国际长途")
    private String internationmoney;

    @Override
    public CdrSetmeal convert() {
        CdrSetmeal info = new CdrSetmeal();
        info.setName(name);
        info.setRemarks(remarks);
        info.setRentalunit(rentalunit);
        info.setRentalmoney(rentalmoney);
        info.setRentalminute(rentalminute);
        info.setCreatetime(createtime);
        info.setChargingtime(chargingtime);
        info.setLocalmoneys(localmoneys);
        info.setLocalmoney(localmoney);
        info.setDomesticmoney(domesticmoney);
        info.setInternationmoney(internationmoney);
        KefuContext context = KefuContext.getKefuContext();
        info.setOid(oid);
        return info;
	}
}